home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1588 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: erich.triumf.ca!bennett
  2. From: bennett@erich.triumf.ca (P.Bennett)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Question!@#!
  5. Date: 15 Jan 1996 07:53 PST
  6. Organization: TRIUMF: Tri-University Meson Facility
  7. Distribution: world
  8. Message-ID: <15JAN199607533289@erich.triumf.ca>
  9. References: <4dcejq$2un@venus.senecac.on.ca>
  10. NNTP-Posting-Host: ftp.triumf.ca
  11. News-Software: VAX/VMS VNEWS 1.50    
  12.  
  13. In article <4dcejq$2un@venus.senecac.on.ca>, cweselak@learn.senecac.on.ca (Christian Weselak) writes...
  14. >I have a very Simple question.. well, it should be simple for 'alot' of 
  15. >you reading this newsgroup..
  16. >anyways.
  17. >I have created a program that asks THE users for his name, then writes it 
  18. >to a file, the file is called name.txt..
  19. >Evertime this program is executed, the file name.txt get's overwritten.
  20. >How can i keep this file, name.txt, so that i can eventually have a 
  21. >listing of all users who ran my program???
  22.  
  23. You have to open the file in "update" mode:
  24.  
  25.     file = fopen("name.txt","a+");
  26.  
  27.  
  28. Peter Bennett VE7CEI                | Vessels shall be deemed to be in sight
  29. Internet: bennett@triumf.ca         | of one another only when one can be
  30. Packet: ve7cei@ve7kit.#vanc.bc.ca   | observed visually from the other
  31. TRIUMF, Vancouver, B.C., Canada     |                          ColRegs 3(k)
  32. GPS and NMEA info and programs: ftp://sundae.triumf.ca/pub/peter/index.html
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.